<!-- 预览总评成绩 -->
<template>
  <div class="assessment-edit-plan-container">
    <div class="my-form-container" style="width:100%;height: 100%">
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">开课教研室</div>
          <div class="my-form-item-value">{{ detailInfo.teachingClassName }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程编号</div>
          <div class="my-form-item-value">{{ detailInfo.courseCode }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程名称</div>
          <div class="my-form-item-value">{{ detailInfo.courseName }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程主页</div>
          <div class="my-form-item-value">{{ detailInfo.courseHomepage }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程英文名称</div>
          <div class="my-form-item-value">{{ detailInfo.courseEnName }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">学分</div>
          <div class="my-form-item-value">{{ detailInfo.credit }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">讲授学时</div>
          <div class="my-form-item-value">{{ detailInfo.teachingHours }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">实践学时</div>
          <div class="my-form-item-value">{{ detailInfo.practiceHours }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">总学时</div>
          <div class="my-form-item-value">{{ detailInfo.totalHours }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">学科分类</div>
          <div class="my-form-item-value">{{ detailInfo.subjectType }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">适用培养层次</div>
          <div class="my-form-item-value">{{ detailInfo.eduLevel }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程负责人</div>
          <div class="my-form-item-value">{{ detailInfo.courseCharger }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程评价</div>
          <div class="my-form-item-value">{{ detailInfo.courseEvaluate }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">是否为主干课</div>
          <div class="my-form-item-value">{{ detailInfo.mainSubject }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程类型</div>
          <div class="my-form-item-value">{{ detailInfo.courseType }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">分制</div>
          <div class="my-form-item-value">{{ detailInfo.pointsSystem }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课下作业成绩所占比例</div>
          <div class="my-form-item-value">{{ detailInfo.homeworkRatio }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课堂测试成绩所占比例</div>
          <div class="my-form-item-value">{{ detailInfo.hskeRatio }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">期中考试成绩所占比例</div>
          <div class="my-form-item-value">{{ detailInfo.midExamRatio }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">期末考试成绩所占比例</div>
          <div class="my-form-item-value">{{ detailInfo.finalExamRetio }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="24">
          <div class="my-form-item-label">考试成绩一票否决制</div>
          <div class="my-form-item-value">{{ detailInfo.gradeOneVeto }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="24">
          <div class="my-form-item-label">课程标准</div>
          <div class="my-form-item-value">{{ detailInfo.courseStandard }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="24">
          <div class="my-form-item-label">先修课程</div>
          <div class="my-form-item-value">{{ detailInfo.prerequisiteCourse }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="24">
          <div class="my-form-item-label">课程简介</div>
          <div class="my-form-item-value">{{ detailInfo.courseIntro }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="24">
          <div class="my-form-item-label">备注</div>
          <div class="my-form-item-value">{{ detailInfo.remark }}</div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="24">
          <div class="my-form-item-label">状态</div>
          <div class="my-form-item-value">{{ detailInfo.state }}</div>
        </el-col>
      </el-row>
    </div>
    <div class="button-group">
      <div class="" @click="cancel">关闭</div>
    </div>
  </div>
</template>

<script>
import { reqCheckLevelList } from "@/api/admin1/check";
import { reqeditById } from "@/api/course/courses";
export default {
  data() {
    return {
      // id:'',
      detailInfo:{},
    };
  },
  mounted() {
    this.detailInfo = JSON.parse(localStorage.getItem("studentData"));
    // this.initData();
  },
  methods: {
    /* initData(){
      let id = this.id;
      reqeditById(id).then(res=>{
          this.detailInfo = res.data.data;
          this.getLevelList();
      })
    }, */
    // 获取培养层次下拉框
    async getLevelList() {
      const result = await reqCheckLevelList('pylevel');
      const data = result.data.data[0].children;
      console.log(this.detailInfo.eduLevel)
      data.forEach((item,index)=>{
        if(item.id == this.detailInfo.eduLevel){
            this.detailInfo.eduLevel = item.dictValue;
        }
      })
    },
    cancel(){
      var one = location.getItem("routeoneSign");
      var two = location.getItem("routetwoSign");
      var three = location.getItem("routethreeSign");
      if(one && one == 'transPage'){
        this.$router.push({
            path: "/admin/courseAssessment/TranscriptPrinting", //要跳转的页面的路由
        });
        localStorage.removeItem("reqeditById");
        localStorage.removeItem("transPage");
      } else if(two && two == 'examPage') {
        this.$router.push({
            path: "/admin/courseAssessment/examTranscript.vue", //要跳转的页面的路由
        });
        localStorage.removeItem("reqeditById");
        localStorage.removeItem("examPage");
      } else if(three && three == 'addTestPage') {
        this.$router.push({
            path: "/admin/courseAssessment/addTestCourse.vue", //要跳转的页面的路由
        });
        localStorage.removeItem("reqeditById");
        localStorage.removeItem("addTestPage");
      }
    }
  },
};
</script>
<style lang="less" scoped>
.el-tooltip__popper{
  max-width:20%;
}
/deep/.el-input__inner {
  border: none;
}
.bk {
  /deep/ .el-input__inner {
    border-radius: 4px;
    border: 1px solid #004ca7;
  }
}
.zyjs {
  width: 30% !important;
  margin-left: 40px !important;
  /deep/ .el-input__inner {
    height: 70px !important;
    border-radius: 4px;
    border: 1px solid #004ca7;
  }
}
.el-input {
  width: 26%;
  display: flex;
  align-items: center;
  margin-left: 40px;
}
.my-form-item {
  height: 80px;
}
.el-date-editor {
  width: 38%;
}
.choose-ypr-container {
  width: 100%;
  margin: 0px auto;

  .choose-ypr-search-container {
    .el-input--prefix .el-input__inner {
      padding-left: 30px;
    }

    .el-input__inner {
      &::placeholder {
        color: #b8b8b8;
      }

      &::-webkit-input-placeholder {
        /* WebKit browsers 适配谷歌 */
        color: #b8b8b8;
      }

      &:-moz-placeholder {
        /* Mozilla Firefox 4 to 18 适配火狐 */
        color: #b8b8b8;
      }

      &::-moz-placeholder {
        /* Mozilla Firefox 19+ 适配火狐 */
        color: #b8b8b8;
      }

      &:-ms-input-placeholder {
        /* Internet Explorer 10+  适配ie*/
        color: #b8b8b8;
      }
    }

    display: flex;
    flex-direction: row;
    align-items: center;

    .title {
      font-size: 18px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 20px;
      color: #004ca7;
      margin-right: 5px;
    }

    .search-button {
      width: 77px;
      height: 28px;
      line-height: 28px;
      background: #f1f8fe;
      border: 1px solid #51aef6;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;

      > span {
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #51aef6;
      }

      > img {
        width: 20px;
        height: 20px;
        margin-right: 4px;
      }
    }

    .button-list {
      display: flex;
      flex-direction: row;
      align-items: center;
      margin-left: 21px;

      .button-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 69px;
        height: 27px;
        line-height: 27px;
        border: 1px solid #004ca7;
        border-radius: 4px;
        margin-right: 10px;
        text-align: center;
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #004ca7;

        .del-icon {
          position: absolute;
          right: 0px;
          top: 0px;
          width: 12px;
          height: 12px;
          padding: 2px;
        }
      }
    }
  }
}

.assessment-container {
  .el-dialog__body {
    height: 251px;
  }

  .el-dialog__footer {
    padding: 10px 20px 45px;
  }

  .el-checkbox__inner:hover {
    border-color: #004ca7;
  }

  .el-checkbox__inner {
    border: 1px solid #004ca7;
    border-radius: 0;
    height: 18px;
    width: 18px;
  }

  .el-checkbox__inner::after {
    height: 10px;
    left: 6px;
  }

  .el-checkbox__input.is-checked .el-checkbox__inner,
  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
    background-color: #004ca7;
    border-color: #004ca7;
  }

  .el-checkbox__input.is-checked + .el-checkbox__label {
    color: #004ca7;
  }

  .el-checkbox.is-bordered.is-checked {
    border-color: #004ca7;
  }

  .el-checkbox__input.is-focus .el-checkbox__inner {
    border-color: #004ca7;
  }
}

.cz-save {
  box-sizing: border-box;
  line-height: 44px;
  border-radius: 4px;
  font-size: 12px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  text-align: center;
  margin-top: 70px;
  margin-left: 40px;
  display: flex;
  flex-direction: row;
  cursor: pointer;
  align-content: center;
  justify-content: center;
  align-items: center;
}

.jf-save {
  display: flex;
  align-items: center;
  margin-left: 48px;
}

.fileClass {
  position: relative;
  cursor: pointer;

  .save {
    width: 120px;
    height: 50px;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    color: #fff;
    background: #303133;
  }
}

.my-form-item-value {
  font-size: 16px;
  color: #004ca7;
  height: 100%;
  flex: 1;
  line-height: 60px;
  padding-left: 38px;
  display: flex;
  align-items: center;
}

.assessment-edit-plan-container {
  .assessment-design {
    .el-textarea__inner {
      resize: none;
      font-size: 16px;
      color: rgba(0, 76, 167, 1);
    }
  }
  
  .button-group {
    margin-top: 50px;
    text-align: center;

    > div {
        display: inline-block;
        font-size: 18px;
        padding: 6px 22px;
        border-radius: 6px;
        color: #f3b815;
        border: 1px solid #f3b815;
        background: #fff6ef;
        margin-right: 139px;
    }
  }
}
</style>
<style scoped lang="less">
.assessment-edit-plan-container {
  .assessment-design {
    padding: 25px 38px !important;
  }
}
</style>
